<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.asm-nasm</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (Intel x86 (NASM)) - Theme (Breeze Light)"/>
</head><body style="background-color:#ffffff;color:#1f1c1b"><pre>
<span style="color:#898887;">; Example file for nasm.xml kate syntax file</span>
<span style="color:#898887;">; compile with `nasm example.asm -f elf -o example.o`</span>
<span style="color:#898887;">; and link with 'gcc example.o -o example`</span>
<span style="color:#898887;">; Public domain</span>
<span style="color:#898887;">; </span><span style="color:#ca60ca;">kate:</span><span style="color:#898887;"> </span><span style="color:#0095ff;">hl</span><span style="color:#bf0303;"> Intel x86 (NASM)</span><span style="color:#0095ff;">;</span>

<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.data</span>

hello <span style="color:#0057ae;">dd</span> <span style="color:#bf0303;">'Hello World'</span>, <span style="color:#b08000;">0x</span><span style="color:#b08000;">0A</span>, <span style="color:#b08000;">0</span><span style="color:#b08000;">h</span>
printf_param <span style="color:#0057ae;">dd</span> <span style="color:#bf0303;">'%s'</span>, <span style="color:#b08000;">0</span><span style="color:#b08000;">q</span>

<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.text</span>

<span style="font-weight:bold;">extern</span> printf

<span style="font-weight:bold;">global</span> main
<span style="color:#644a9b;">main:</span>
	<span style="font-weight:bold;">push</span> <span style="font-weight:bold;">ebp</span>
	<span style="font-weight:bold;">mov</span> <span style="font-weight:bold;">ebp</span>, <span style="font-weight:bold;">esp</span>
	
	<span style="font-weight:bold;">push</span> hello
	<span style="font-weight:bold;">push</span> printf_param
	<span style="font-weight:bold;">call</span> printf
	
	<span style="font-weight:bold;">mov</span> <span style="font-weight:bold;">eax</span>, <span style="color:#b08000;">0</span><span style="color:#b08000;">b</span>
	<span style="font-weight:bold;">leave</span>
	<span style="font-weight:bold;">ret</span>


NULL              <span style="color:#0057ae;">EQU</span> <span style="color:#b08000;">0</span>                         <span style="color:#898887;">; Constants</span>
STD_OUTPUT_HANDLE <span style="color:#0057ae;">EQU</span> -<span style="color:#b08000;">11</span>

<span style="font-weight:bold;">extern</span> GetStdHandle                             <span style="color:#898887;">; Import external symbols</span>

<span style="font-weight:bold;">global</span> Start                                    <span style="color:#898887;">; Export symbols. The entry point</span>

<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.data</span>                                   <span style="color:#898887;">; Initialized data segment</span>
 Message        <span style="color:#0057ae;">db</span> <span style="color:#bf0303;">&quot;Console Message 64&quot;</span>, <span style="color:#b08000;">0D</span><span style="color:#b08000;">h</span>, <span style="color:#b08000;">0A</span><span style="color:#b08000;">h</span>
 MessageLength  <span style="color:#0057ae;">EQU</span> $-Message                   <span style="color:#898887;">; Address of this line ($) - address of Message</span>

<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.bss</span>                                    <span style="color:#898887;">; Uninitialized data segment</span>
<span style="font-weight:bold;">alignb</span> <span style="color:#b08000;">8</span>
 Written        <span style="color:#0057ae;">resq</span> <span style="color:#b08000;">1</span>

<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.text</span>                                   <span style="color:#898887;">; Code segment</span>
<span style="color:#644a9b;">Start:</span>
 <span style="font-weight:bold;">sub</span>   <span style="font-weight:bold;">RSP</span>, <span style="color:#b08000;">8</span>                                   <span style="color:#898887;">; Align the stack to a multiple of 16 bytes</span>

 <span style="font-weight:bold;">mov</span>   <span style="font-weight:bold;">ECX</span>, STD_OUTPUT_HANDLE
 <span style="font-weight:bold;">call</span>  GetStdHandle
 <span style="font-weight:bold;">mov</span>   <span style="color:#0057ae;">qword</span> [<span style="font-weight:bold;">REL</span> StandardHandle], <span style="font-weight:bold;">RAX</span>

 <span style="font-weight:bold;">sub</span>   <span style="font-weight:bold;">RSP</span>, <span style="color:#b08000;">32</span> + <span style="color:#b08000;">8</span> + <span style="color:#b08000;">8</span>                          <span style="color:#898887;">; Shadow space + 5th parameter + align stack</span>
                                                <span style="color:#898887;">; to a multiple of 16 bytes</span>
 <span style="font-weight:bold;">mov</span>   <span style="font-weight:bold;">RCX</span>, <span style="color:#0057ae;">qword</span> [<span style="font-weight:bold;">REL</span> StandardHandle]          <span style="color:#898887;">; 1st parameter</span>
 <span style="font-weight:bold;">lea</span>   <span style="font-weight:bold;">RDX</span>, [<span style="font-weight:bold;">REL</span> Message]                       <span style="color:#898887;">; 2nd parameter</span>
 <span style="font-weight:bold;">mov</span>   <span style="font-weight:bold;">R8</span>, MessageLength                        <span style="color:#898887;">; 3rd parameter</span>
 <span style="font-weight:bold;">mov</span>   <span style="color:#0057ae;">qword</span> [<span style="font-weight:bold;">RSP</span> + <span style="color:#b08000;">4</span> * <span style="color:#b08000;">8</span>], NULL                <span style="color:#898887;">; 5th parameter</span>
                                                <span style="color:#898887;">; Message Box, 64 bit. V1.02</span>
<span style="color:#644a9b;">.DisplayMessageBox:</span>
 <span style="font-weight:bold;">xor</span>   <span style="font-weight:bold;">ECX</span>, <span style="font-weight:bold;">ECX</span>                                 <span style="color:#898887;">; 1st parameter</span>
 <span style="font-weight:bold;">lea</span>   <span style="font-weight:bold;">RDX</span>, [<span style="font-weight:bold;">REL</span> MessageBoxText]                <span style="color:#898887;">; 2nd parameter</span>
 <span style="font-weight:bold;">lea</span>   <span style="font-weight:bold;">R8</span>, [<span style="font-weight:bold;">REL</span> MessageBoxCaption]              <span style="color:#898887;">; 3rd parameter</span>
 <span style="font-weight:bold;">mov</span>   <span style="font-weight:bold;">R9D</span>, MB_YESNO | MB_DEFBUTTON2            <span style="color:#898887;">; 4th parameter. 2 constants ORed together</span>
 <span style="font-weight:bold;">call</span>  MessageBoxA

 <span style="font-weight:bold;">cmp</span>   <span style="font-weight:bold;">RAX</span>, IDNO                                <span style="color:#898887;">; Check the return value for &quot;No&quot;</span>
 <span style="font-weight:bold;">je</span>    <span style="color:#644a9b;">.DisplayMessageBox</span>

<span style="font-weight:bold;">extern</span> _GetStdHandle@4                          <span style="color:#898887;">; Import external symbols</span>
<span style="color:#644a9b;">Start:</span>
 <span style="font-weight:bold;">call</span>  _WriteFile@20

<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.data</span>                                   <span style="color:#898887;">; Initialized data segment</span>
 Static1Colour    <span style="color:#0057ae;">dd</span> <span style="color:#b08000;">0F0F0F0</span><span style="color:#b08000;">h</span>,
 Edit2            <span style="color:#0057ae;">resq</span> <span style="color:#b08000;">1</span>

<span style="color:#006e28;">%define</span> Screen.Width       <span style="font-weight:bold;">RBP</span> - <span style="color:#b08000;">160</span>            <span style="color:#898887;">; 4 bytes</span>
<span style="color:#006e28;">%define</span> ClientArea         <span style="font-weight:bold;">RBP</span> - <span style="color:#b08000;">152</span>            <span style="color:#898887;">; RECT structure. 16 bytes</span>

 <span style="font-weight:bold;">mov</span>   <span style="color:#0057ae;">dword</span> [wc.cbSize], <span style="color:#b08000;">80</span>                    <span style="color:#898887;">; [RBP - 136]</span>
 <span style="font-weight:bold;">mov</span>   <span style="color:#0057ae;">dword</span> [wc.style], CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW  <span style="color:#898887;">; [RBP - 132]</span>
 <span style="font-weight:bold;">mov</span>   <span style="color:#0057ae;">qword</span> [wc.lpfnWndProc], <span style="font-weight:bold;">RAX</span>              <span style="color:#898887;">; [RBP - 128]</span>
 <span style="font-weight:bold;">mov</span>   <span style="color:#0057ae;">qword</span> [wc.hIcon], <span style="font-weight:bold;">RAX</span>                    <span style="color:#898887;">; [RBP - 104]</span>
 <span style="font-weight:bold;">mov</span>   <span style="color:#0057ae;">dword</span> [<span style="font-weight:bold;">RSP</span> + <span style="color:#b08000;">4</span> * <span style="color:#b08000;">8</span>], <span style="font-weight:bold;">EAX</span>                 <span style="color:#898887;">; X position, now centred</span>

 <span style="font-weight:bold;">cmp</span>   <span style="color:#0057ae;">qword</span> [uMsg], WM_CLOSE                   <span style="color:#898887;">; [RBP + 24]</span>
 <span style="font-weight:bold;">je</span>    WMCLOSE
 <span style="font-weight:bold;">call</span>  DestroyWindow                            <span style="color:#898887;">; Send a WM_DESTROY message</span>
 <span style="font-weight:bold;">jmp</span>   Return.WM_Processed
 <span style="font-weight:bold;">mov</span>   <span style="font-weight:bold;">EDX</span>, <span style="color:#b08000;">0604060</span><span style="color:#b08000;">h</span>
 <span style="font-weight:bold;">call</span>  SetBkColor
 <span style="font-weight:bold;">mov</span>   <span style="font-weight:bold;">EDX</span>, <span style="color:#b08000;">0005000</span><span style="color:#b08000;">h</span>

<span style="color:#0057ae;">db</span> <span style="color:#b08000;">0x</span><span style="color:#b08000;">55</span> <span style="color:#898887;">; just the byte 0x55</span>
<span style="color:#0057ae;">db</span> <span style="color:#b08000;">0x</span><span style="color:#b08000;">55</span>,<span style="color:#b08000;">0x</span><span style="color:#b08000;">56</span>,<span style="color:#b08000;">0x</span><span style="color:#b08000;">57</span> <span style="color:#898887;">; three bytes in succession</span>
<span style="color:#0057ae;">db</span> <span style="color:#bf0303;">'a'</span>,<span style="color:#b08000;">0x</span><span style="color:#b08000;">55</span> <span style="color:#898887;">; character constants are OK</span>
<span style="color:#0057ae;">db</span> <span style="color:#bf0303;">'hello'</span>,<span style="color:#b08000;">13</span>,<span style="color:#b08000;">10</span>,<span style="color:#bf0303;">'$'</span> <span style="color:#898887;">; so are string constants</span>
<span style="color:#0057ae;">dw</span> <span style="color:#b08000;">0x</span><span style="color:#b08000;">1234</span> <span style="color:#898887;">; 0x34 0x12</span>
<span style="color:#0057ae;">dw</span> <span style="color:#bf0303;">'a'</span> <span style="color:#898887;">; 0x61 0x00 (it's just a number)</span>
<span style="color:#0057ae;">dw</span> <span style="color:#bf0303;">'ab'</span> <span style="color:#898887;">; 0x61 0x62 (character constant)</span>
<span style="color:#0057ae;">dw</span> <span style="color:#bf0303;">'abc'</span> <span style="color:#898887;">; 0x61 0x62 0x63 0x00 (string)</span>
<span style="color:#0057ae;">dd</span> <span style="color:#b08000;">0x</span><span style="color:#b08000;">12345678</span> <span style="color:#898887;">; 0x78 0x56 0x34 0x12</span>
<span style="color:#0057ae;">dd</span> <span style="color:#b08000;">1.234567e20</span> <span style="color:#898887;">; floating-point constant</span>
<span style="color:#0057ae;">dq</span> <span style="color:#b08000;">0x</span><span style="color:#b08000;">123456789abcdef0</span> <span style="color:#898887;">; eight byte constant</span>
<span style="color:#0057ae;">dq</span> <span style="color:#b08000;">1.234567e20</span> <span style="color:#898887;">; double-precision float</span>
<span style="color:#0057ae;">dt</span> <span style="color:#b08000;">1.234567e20</span> <span style="color:#898887;">; extended-precision float</span>

<span style="color:#0057ae;">db</span> <span style="color:#b08000;">33</span>
<span style="color:#0057ae;">db</span> (<span style="color:#b08000;">44</span>)               <span style="color:#898887;">; Integer expression</span>
<span style="color:#898887;">; db (44,55)            ; Invalid - error</span>
<span style="color:#0057ae;">db</span> %(<span style="color:#b08000;">44</span>,<span style="color:#b08000;">55</span>)
<span style="color:#0057ae;">db</span> %(<span style="color:#bf0303;">'XX'</span>,<span style="color:#bf0303;">'YY'</span>)
<span style="color:#0057ae;">db</span> (<span style="color:#bf0303;">'AA'</span>)             <span style="color:#898887;">; Integer expression - outputs single byte</span>
<span style="color:#0057ae;">db</span> %(<span style="color:#bf0303;">'BB'</span>)            <span style="color:#898887;">; List, containing a string</span>
<span style="color:#0057ae;">db</span> ?
<span style="color:#0057ae;">db</span> <span style="color:#b08000;">6</span> dup (<span style="color:#b08000;">33</span>)
<span style="color:#0057ae;">db</span> <span style="color:#b08000;">6</span> dup (<span style="color:#b08000;">33</span>, <span style="color:#b08000;">34</span>)
<span style="color:#0057ae;">db</span> <span style="color:#b08000;">6</span> dup (<span style="color:#b08000;">33</span>, <span style="color:#b08000;">34</span>), <span style="color:#b08000;">35</span>
<span style="color:#0057ae;">db</span> <span style="color:#b08000;">7</span> dup (<span style="color:#b08000;">99</span>)
<span style="color:#0057ae;">db</span> <span style="color:#b08000;">7</span> dup <span style="color:#0057ae;">dword</span> (?, <span style="color:#0057ae;">word</span> ?, ?)
<span style="color:#0057ae;">dw</span> <span style="color:#0057ae;">byte</span> (?,<span style="color:#b08000;">44</span>)
<span style="color:#0057ae;">dw</span> <span style="color:#b08000;">3</span> dup (<span style="color:#b08000;">0x</span><span style="color:#b08000;">cc</span>, <span style="color:#b08000;">4</span> dup <span style="color:#0057ae;">byte</span> (<span style="color:#bf0303;">'PQR'</span>), ?), <span style="color:#b08000;">0x</span><span style="color:#b08000;">abcd</span>
<span style="color:#0057ae;">dd</span> <span style="color:#b08000;">16</span> dup (<span style="color:#b08000;">0x</span><span style="color:#b08000;">aaaa</span>, ?, <span style="color:#b08000;">0x</span><span style="color:#b08000;">bbbbbb</span>)
<span style="color:#0057ae;">dd</span> <span style="color:#b08000;">64</span> dup (?)
<span style="color:#0057ae;">db</span> <span style="color:#bf0303;">`</span><span style="color:#924c9d;">\u263a</span><span style="color:#bf0303;">`</span>            <span style="color:#898887;">; UTF-8 smiley face</span>
<span style="color:#0057ae;">db</span> <span style="color:#bf0303;">`</span><span style="color:#924c9d;">\xe2\x98\xba</span><span style="color:#bf0303;">`</span>      <span style="color:#898887;">; UTF-8 smiley face</span>
<span style="color:#0057ae;">db</span> <span style="color:#b08000;">0E2</span><span style="color:#b08000;">h</span>, <span style="color:#b08000;">098</span><span style="color:#b08000;">h</span>, <span style="color:#b08000;">0BA</span><span style="color:#b08000;">h</span>    <span style="color:#898887;">; UTF-8 smiley face</span>
<span style="color:#644a9b;">buffer:</span>         <span style="color:#0057ae;">resb</span>    <span style="color:#b08000;">64</span>              <span style="color:#898887;">; reserve 64 bytes </span>
<span style="color:#644a9b;">wordvar:</span>        <span style="color:#0057ae;">resw</span>    <span style="color:#b08000;">1</span>               <span style="color:#898887;">; reserve a word </span>
<span style="color:#644a9b;">buffer:</span>         <span style="color:#0057ae;">db</span>      <span style="color:#b08000;">64</span> dup (?)      <span style="color:#898887;">; reserve 64 bytes </span>
<span style="color:#644a9b;">wordvar:</span>        <span style="color:#0057ae;">dw</span>      ?               <span style="color:#898887;">; reserve a word </span>

<span style="color:#0057ae;">incbin</span>  <span style="color:#bf0303;">&quot;file.dat&quot;</span>             <span style="color:#898887;">; include the whole file</span>
<span style="color:#0057ae;">incbin</span>  <span style="color:#bf0303;">&quot;file.dat&quot;</span>,<span style="color:#b08000;">1024</span>        <span style="color:#898887;">; skip the first 1024 bytes</span>
<span style="color:#0057ae;">incbin</span>  <span style="color:#bf0303;">&quot;file.dat&quot;</span>,<span style="color:#b08000;">1024</span>,<span style="color:#b08000;">512</span>    <span style="color:#898887;">; skip the first 1024, and</span>
                               <span style="color:#898887;">; actually include at most 512</span>

message         <span style="color:#0057ae;">db</span>      <span style="color:#bf0303;">'hello, world'</span> 
msglen          <span style="color:#0057ae;">equ</span>     $-message

<span style="color:#644a9b;">buffer:</span> <span style="color:#0057ae;">db</span>      <span style="color:#bf0303;">'hello, world'</span> 
        <span style="color:#0057ae;">times</span> <span style="color:#b08000;">64</span>-$+buffer <span style="color:#0057ae;">db</span> <span style="color:#bf0303;">' '</span>

     <span style="font-weight:bold;">bndstx</span> [<span style="font-weight:bold;">rbx</span>*<span style="color:#b08000;">1</span>+<span style="font-weight:bold;">rax</span>+<span style="color:#b08000;">0x</span><span style="color:#b08000;">3</span>], bnd0    <span style="color:#898887;">; GAS - '*1' indecates an index reg</span>
     <span style="font-weight:bold;">VDIVPS</span> <span style="font-weight:bold;">zmm4</span>, <span style="font-weight:bold;">zmm5</span>, <span style="color:#0057ae;">dword</span> [<span style="font-weight:bold;">rbx</span>]{<span style="color:#b08000;">1to16</span>}   <span style="color:#898887;">; single-precision float </span>
     <span style="font-weight:bold;">VDIVPS</span> <span style="font-weight:bold;">zmm4</span>, <span style="font-weight:bold;">zmm5</span>, <span style="color:#0057ae;">zword</span> [<span style="font-weight:bold;">rbx</span>]          <span style="color:#898887;">; packed 512 bit memory</span>

<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">200</span>          <span style="color:#898887;">; decimal</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0200</span>         <span style="color:#898887;">; still decimal</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0200</span><span style="color:#b08000;">d</span>        <span style="color:#898887;">; explicitly decimal</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0d</span><span style="color:#b08000;">200</span>        <span style="color:#898887;">; also decimal</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0c8</span><span style="color:#b08000;">h</span>         <span style="color:#898887;">; hex</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,$<span style="color:#b08000;">0c8</span>         <span style="color:#898887;">; hex again: the 0 is required</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0x</span><span style="color:#b08000;">c8</span>         <span style="color:#898887;">; hex yet again</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0h</span><span style="color:#b08000;">c8</span>         <span style="color:#898887;">; still hex</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">310</span><span style="color:#b08000;">q</span>         <span style="color:#898887;">; octal</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">310</span><span style="color:#b08000;">o</span>         <span style="color:#898887;">; octal again</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0o</span><span style="color:#b08000;">310</span>        <span style="color:#898887;">; octal yet again</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0q</span><span style="color:#b08000;">310</span>        <span style="color:#898887;">; octal yet again</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">11001000</span><span style="color:#b08000;">b</span>    <span style="color:#898887;">; binary</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">1100_1000</span><span style="color:#b08000;">b</span>   <span style="color:#898887;">; same binary constant</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">1100_1000</span><span style="color:#b08000;">y</span>   <span style="color:#898887;">; same binary constant once more</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0b</span><span style="color:#b08000;">1100_1000</span>  <span style="color:#898887;">; same binary constant yet again</span>
<span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0y</span><span style="color:#b08000;">1100_1000</span>  <span style="color:#898887;">; same binary constant yet again</span>

<span style="color:#006e28;">%define</span> u(x) <span style="font-weight:bold;">__?utf16?__</span>(x) 
<span style="color:#006e28;">%define</span> w(x) <span style="font-weight:bold;">__?utf32?__</span>(x) 

<span style="color:#0057ae;">dw</span> u(<span style="color:#bf0303;">'C:\WINDOWS'</span>), <span style="color:#b08000;">0</span>       <span style="color:#898887;">; Pathname in UTF-16</span>
<span style="color:#0057ae;">dd</span> w(<span style="color:#bf0303;">`A + B = </span><span style="color:#924c9d;">\u206a</span><span style="color:#bf0303;">`</span>), <span style="color:#b08000;">0</span>   <span style="color:#898887;">; String in UTF-32</span>

<span style="color:#0057ae;">db</span>    -<span style="color:#b08000;">0.2</span>                    <span style="color:#898887;">; &quot;Quarter precision&quot;</span>
<span style="color:#0057ae;">dw</span>    -<span style="color:#b08000;">0.5</span>                    <span style="color:#898887;">; IEEE 754r/SSE5 half precision</span>
<span style="color:#0057ae;">dd</span>    <span style="color:#b08000;">1.2</span>                     <span style="color:#898887;">; an easy one</span>
<span style="color:#0057ae;">dd</span>    <span style="color:#b08000;">1.222_222_222</span>           <span style="color:#898887;">; underscores are permitted</span>
<span style="color:#0057ae;">dd</span>    <span style="color:#b08000;">0x1p+2</span>                  <span style="color:#898887;">; 1.0x2^2 = 4.0</span>
<span style="color:#0057ae;">dq</span>    <span style="color:#b08000;">0x1p+32</span>                 <span style="color:#898887;">; 1.0x2^32 = 4 294 967 296.0</span>
<span style="color:#0057ae;">dq</span>    <span style="color:#b08000;">1.e10</span>                   <span style="color:#898887;">; 10 000 000 000.0</span>
<span style="color:#0057ae;">dq</span>    <span style="color:#b08000;">1.e+10</span>                  <span style="color:#898887;">; synonymous with 1.e10</span>
<span style="color:#0057ae;">dq</span>    <span style="color:#b08000;">1.e-10</span>                  <span style="color:#898887;">; 0.000 000 000 1</span>
<span style="color:#0057ae;">dt</span>    <span style="color:#b08000;">3.141592653589793238462</span> <span style="color:#898887;">; pi</span>
<span style="color:#0057ae;">do</span>    <span style="color:#b08000;">1.e+4000</span>                <span style="color:#898887;">; IEEE 754r quad precision</span>

<span style="font-weight:bold;">mov</span>    <span style="font-weight:bold;">rax</span>,<span style="font-weight:bold;">__?float64?__</span>(<span style="color:#b08000;">3.141592653589793238462</span>)
<span style="font-weight:bold;">mov</span>    <span style="font-weight:bold;">rax</span>,<span style="color:#b08000;">0x</span><span style="color:#b08000;">400921fb54442d18</span>

<span style="color:#006e28;">%define</span> Inf <span style="font-weight:bold;">__?Infinity?__</span> 
<span style="color:#006e28;">%define</span> NaN <span style="font-weight:bold;">__?QNaN?__</span> 

<span style="color:#0057ae;">dq</span>    +<span style="color:#b08000;">1.5</span>, -Inf, NaN         <span style="color:#898887;">; Double-precision constants</span>
<span style="color:#0057ae;">dt</span> <span style="color:#b08000;">12_345_678_901_245_678</span><span style="color:#b08000;">p</span>
<span style="color:#0057ae;">dt</span> -<span style="color:#b08000;">12_345_678_901_245_678</span><span style="color:#b08000;">p</span>
<span style="color:#0057ae;">dt</span> +<span style="color:#b08000;">0p33</span>
<span style="color:#0057ae;">dt</span> <span style="color:#b08000;">33</span><span style="color:#b08000;">p</span>

<span style="color:#0057ae;">dq</span> b * (a // b) + (a <span style="color:#644a9b;">%%</span> b)

<span style="font-weight:bold;">call</span>    (<span style="font-weight:bold;">seg</span> procedure):procedure
<span style="font-weight:bold;">call</span>    weird_seg:(procedure <span style="font-weight:bold;">wrt</span> weird_seg)

<span style="font-weight:bold;">push</span> <span style="color:#0057ae;">dword</span> <span style="color:#b08000;">33</span>
<span style="font-weight:bold;">push</span> <span style="font-weight:bold;">strict</span> <span style="color:#0057ae;">dword</span> <span style="color:#b08000;">33</span>

<span style="color:#0057ae;">times</span> (label-$) <span style="color:#0057ae;">db</span> <span style="color:#b08000;">0</span>

<span style="color:#644a9b;">label:</span>  <span style="color:#0057ae;">db</span>      <span style="color:#bf0303;">'Where am I?'</span>
        <span style="color:#0057ae;">times</span> (label-$+1) <span style="color:#0057ae;">db</span> <span style="color:#b08000;">0</span> 
<span style="color:#644a9b;">label:</span>  <span style="color:#0057ae;">db</span>      <span style="color:#bf0303;">'NOW where am I?'</span>

label1  <span style="color:#898887;">; some code </span>

.<span style="font-weight:bold;">loop</span> 
        <span style="color:#898887;">; some more code </span>

        <span style="font-weight:bold;">jne</span>     <span style="color:#644a9b;">.loop</span> 
        <span style="font-weight:bold;">ret</span> 

<span style="color:#644a9b;">label1:</span>                         <span style="color:#898887;">; a non-local label </span>
<span style="color:#644a9b;">.local:</span>                         <span style="color:#898887;">; this is really label1.local </span>
<span style="color:#644a9b;">..@foo:</span>                         <span style="color:#898887;">; this is a special symbol </span>
<span style="color:#644a9b;">label2:</span>                         <span style="color:#898887;">; another non-local label </span>
<span style="color:#644a9b;">.local:</span>                         <span style="color:#898887;">; this is really label2.local </span>

        <span style="font-weight:bold;">jmp</span>     <span style="color:#644a9b;">..@foo</span>          <span style="color:#898887;">; this will jump three lines up</span>


<span style="color:#006e28;">%define</span> THIS_VERY_LONG_MACRO_NAME_IS_DEFINED_TO \ 
        THIS_VALUE

<span style="color:#006e28;">%define</span> ctrl    <span style="color:#b08000;">0x</span><span style="color:#b08000;">1F</span> &amp; 
<span style="color:#006e28;">%define</span> param(a,b) ((a)+(a)*(b)) 

        <span style="font-weight:bold;">mov</span>     <span style="color:#0057ae;">byte</span> [param(<span style="color:#b08000;">2</span>,<span style="font-weight:bold;">ebx</span>)], ctrl <span style="color:#bf0303;">'D'</span>
        <span style="font-weight:bold;">mov</span>     <span style="color:#0057ae;">byte</span> [(<span style="color:#b08000;">2</span>)+(<span style="color:#b08000;">2</span>)*(<span style="font-weight:bold;">ebx</span>)], <span style="color:#b08000;">0x</span><span style="color:#b08000;">1F</span> &amp; <span style="color:#bf0303;">'D'</span>

<span style="color:#006e28;">%define</span> a(x)    <span style="color:#b08000;">1</span>+b(x) 
<span style="color:#006e28;">%define</span> b(x)    <span style="color:#b08000;">2</span>*x 

        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,a(<span style="color:#b08000;">8</span>)

   <span style="color:#006e28;">%define</span> foo (a,b)               <span style="color:#898887;">; no arguments, (a,b) is the expansion </span>
   <span style="color:#006e28;">%define</span> bar(a,b)                <span style="color:#898887;">; two arguments, empty expansion</span>

   <span style="color:#006e28;">%define</span> ereg(foo,) e %+ foo 
     <span style="font-weight:bold;">mov</span> <span style="font-weight:bold;">eax</span>,ereg(<span style="font-weight:bold;">dx</span>,<span style="font-weight:bold;">cx</span>)

    <span style="color:#006e28;">%define</span> xyzzy(=expr,&amp;val) expr, str 
    <span style="color:#006e28;">%define</span> plugh(x) xyzzy(x,x) 
    <span style="color:#0057ae;">db</span> plugh(<span style="color:#b08000;">3</span>+<span style="color:#b08000;">5</span>), <span style="color:#bf0303;">`</span><span style="color:#924c9d;">\0</span><span style="color:#bf0303;">`</span> <span style="color:#898887;">; Expands to: db 8, &quot;3+5&quot;, `\0`</span>

     <span style="font-weight:bold;">mov</span> <span style="font-weight:bold;">ax</span>,Foo%[<span style="font-weight:bold;">__?BITS?__</span>] <span style="color:#898887;">; The Foo value</span>
<span style="color:#006e28;">%xdefine</span> Bar         Quux    <span style="color:#898887;">; Expands due to %xdefine </span>
<span style="color:#006e28;">%define</span>  Bar         %[Quux] <span style="color:#898887;">; Expands due to %[...]</span>



<span style="color:#006e28;">%define</span> BDASTART <span style="color:#b08000;">400</span><span style="color:#b08000;">h</span>                <span style="color:#898887;">; Start of BIOS data area</span>

<span style="font-weight:bold;">struc</span>   tBIOSDA                      <span style="color:#898887;">; its structure </span>
        .COM1addr       <span style="color:#0057ae;">RESW</span>    <span style="color:#b08000;">1</span> 
        .COM2addr       <span style="color:#0057ae;">RESW</span>    <span style="color:#b08000;">1</span> 
        <span style="color:#898887;">; ..and so on </span>
<span style="font-weight:bold;">endstruc</span>

        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,BDASTART + tBIOSDA.COM1addr 
        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">bx</span>,BDASTART + tBIOSDA.COM2addr
<span style="color:#898887;">; Macro to access BIOS variables by their names (from tBDA):</span>

<span style="color:#006e28;">%idefine</span> Foo mov %?,%?? 

<span style="color:#006e28;">%idefine</span> keyword $%?

<span style="color:#006e28;">%idefine</span> <span style="font-weight:bold;">pause</span> $%?                  <span style="color:#898887;">; Hide the PAUSE instruction</span>
<span style="color:#006e28;">%define</span> foo bar 
<span style="color:#006e28;">%undef</span>  foo 

        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">eax</span>, foo
<span style="color:#006e28;">%assign</span> i i+<span style="color:#b08000;">1</span>
<span style="color:#006e28;">%defstr</span> <span style="font-weight:bold;">test</span> TEST
<span style="color:#006e28;">%define</span> <span style="font-weight:bold;">test</span> <span style="color:#bf0303;">'TEST'</span>
<span style="color:#006e28;">%defstr</span> PATH %!PATH          <span style="color:#898887;">; The operating system PATH variable</span>

<span style="color:#006e28;">%deftok</span> <span style="font-weight:bold;">test</span> <span style="color:#bf0303;">'TEST'</span>

<span style="color:#006e28;">%define</span> <span style="font-weight:bold;">test</span> TEST

<span style="color:#006e28;">%define</span> greedy(a,b,c+) a + <span style="color:#b08000;">66</span> %, b * <span style="color:#b08000;">3</span> %, c 

       <span style="color:#0057ae;">db</span> greedy(<span style="color:#b08000;">1</span>,<span style="color:#b08000;">2</span>)          <span style="color:#898887;">; db 1 + 66, 2 * 3 </span>
       <span style="color:#0057ae;">db</span> greedy(<span style="color:#b08000;">1</span>,<span style="color:#b08000;">2</span>,<span style="color:#b08000;">3</span>)        <span style="color:#898887;">; db 1 + 66, 2 * 3, 3 </span>
       <span style="color:#0057ae;">db</span> greedy(<span style="color:#b08000;">1</span>,<span style="color:#b08000;">2</span>,<span style="color:#b08000;">3</span>,<span style="color:#b08000;">4</span>)      <span style="color:#898887;">; db 1 + 66, 2 * 3, 3, 4 </span>
       <span style="color:#0057ae;">db</span> greedy(<span style="color:#b08000;">1</span>,<span style="color:#b08000;">2</span>,<span style="color:#b08000;">3</span>,<span style="color:#b08000;">4</span>,<span style="color:#b08000;">5</span>)    <span style="color:#898887;">; db 1 + 66, 2 * 3, 3, 4, 5</span>

<span style="color:#006e28;">%macro</span>  silly <span style="color:#b08000;">2</span> 
    <span style="color:#006e28;">%</span><span style="color:#b08000;">2</span>: <span style="color:#0057ae;">db</span>      %<span style="color:#b08000;">1</span> 
<span style="color:#006e28;">%endmacro</span> 

        silly <span style="color:#bf0303;">'a'</span>, letter_a             <span style="color:#898887;">; letter_a:  db 'a' </span>
        silly <span style="color:#bf0303;">'ab'</span>, string_ab           <span style="color:#898887;">; string_ab: db 'ab' </span>
        silly {<span style="color:#b08000;">13</span>,<span style="color:#b08000;">10</span>}, crlf             <span style="color:#898887;">; crlf:      db 13,10</span>
<span style="color:#006e28;">%pragma</span> preproc sane_empty_expansion

<span style="color:#006e28;">%macro</span> mpar <span style="color:#b08000;">1</span>-*
     <span style="color:#0057ae;">db</span> %{<span style="color:#b08000;">3</span>:<span style="color:#b08000;">5</span>} 
     <span style="color:#0057ae;">db</span> %{-<span style="color:#b08000;">1</span>:-<span style="color:#b08000;">3</span>} 
<span style="color:#006e28;">%endmacro</span>

mpar <span style="color:#b08000;">1</span>,<span style="color:#b08000;">2</span>,<span style="color:#b08000;">3</span>,<span style="color:#b08000;">4</span>,<span style="color:#b08000;">5</span>,<span style="color:#b08000;">6</span>

<span style="color:#006e28;">%macro</span>  die <span style="color:#b08000;">0</span>-<span style="color:#b08000;">1</span> <span style="color:#bf0303;">&quot;Painful program death has occurred.&quot;</span> 

        writefile <span style="color:#b08000;">2</span>,%<span style="color:#b08000;">1</span> 
        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ax</span>,<span style="color:#b08000;">0x</span><span style="color:#b08000;">4c01</span> 
        <span style="font-weight:bold;">int</span>     <span style="color:#b08000;">0x</span><span style="color:#b08000;">21</span> 

<span style="color:#006e28;">%endmacro</span>

<span style="color:#006e28;">%macro</span>  multipush <span style="color:#b08000;">1</span>-* 

  <span style="color:#006e28;">%rep</span>  %0 
        <span style="font-weight:bold;">push</span>    %<span style="color:#b08000;">1</span> 
  <span style="color:#006e28;">%rotate</span> 1 
  <span style="color:#006e28;">%endrep</span> 

        j%-<span style="color:#b08000;">1</span>    <span style="color:#644a9b;">%%skip</span> 
        <span style="font-weight:bold;">ret</span> 
  <span style="color:#644a9b;">%%skip:</span> 

<span style="color:#006e28;">%endmacro</span>


<span style="color:#006e28;">%macro</span> foo <span style="color:#b08000;">1</span><span style="font-weight:bold;">.nolist</span>

<span style="color:#006e28;">%endmacro</span>

<span style="color:#006e28;">%macro</span>  pushparam <span style="color:#b08000;">1</span> 

  <span style="color:#006e28;">%ifidni</span> %1,ip 
        <span style="font-weight:bold;">call</span>    <span style="color:#644a9b;">%%label</span> 
  <span style="color:#644a9b;">%%label:</span> 
  <span style="color:#006e28;">%else</span> 
        <span style="font-weight:bold;">push</span>    %<span style="color:#b08000;">1</span> 
  <span style="color:#006e28;">%endif</span> 

<span style="color:#006e28;">%endmacro</span>

<span style="color:#006e28;">%assign</span> i <span style="color:#b08000;">0</span> 
<span style="color:#006e28;">%rep</span>    64 
        <span style="font-weight:bold;">inc</span>     <span style="color:#0057ae;">word</span> [table+<span style="color:#b08000;">2</span>*i] 
<span style="color:#006e28;">%assign</span> i i+<span style="color:#b08000;">1</span> 
<span style="color:#006e28;">%endrep</span>


<span style="color:#644a9b;">fibonacci:</span> 
<span style="color:#006e28;">%assign</span> i <span style="color:#b08000;">0</span> 
<span style="color:#006e28;">%assign</span> j <span style="color:#b08000;">1</span> 
<span style="color:#006e28;">%rep</span> 100 
<span style="color:#006e28;">%if</span> j &gt; <span style="color:#b08000;">65535</span> 
    <span style="color:#006e28;">%exitrep</span> 
<span style="color:#006e28;">%endif</span> 
        <span style="color:#0057ae;">dw</span> j 
<span style="color:#006e28;">%assign</span> k j+i 
<span style="color:#006e28;">%assign</span> i j 
<span style="color:#006e28;">%assign</span> j k 
<span style="color:#006e28;">%endrep</span> 

fib_number <span style="color:#0057ae;">equ</span> ($-fibonacci)/<span style="color:#b08000;">2</span>


<span style="color:#006e28;">%include</span> &quot;macros.mac<span style="color:#bf0303;">&quot;</span>


<span style="color:#006e28;">%ifndef</span> MACROS_MAC 
    <span style="color:#006e28;">%define</span> MACROS_MAC 
    <span style="color:#898887;">; now define some macros </span>
<span style="color:#006e28;">%endif</span>

<span style="color:#006e28;">%pathsearch</span> MyFoo <span style="color:#bf0303;">&quot;foo.bin&quot;</span>

<span style="color:#006e28;">%imacro</span> <span style="color:#0057ae;">incbin</span> <span style="color:#b08000;">1</span>-<span style="color:#b08000;">2</span>+ <span style="color:#b08000;">0</span> 
<span style="color:#006e28;">%pathsearch</span> dep %<span style="color:#b08000;">1</span> 
<span style="color:#006e28;">%depend</span> dep 
        <span style="color:#0057ae;">incbin</span> dep,%<span style="color:#b08000;">2</span> 
<span style="color:#006e28;">%endmacro</span>
<span style="color:#006e28;">%use</span> altreg 
<span style="color:#006e28;">%use</span> 'altreg<span style="color:#bf0303;">'</span>

<span style="color:#006e28;">%push</span>    foobar

<span style="color:#006e28;">%macro</span> repeat <span style="color:#b08000;">0</span> 

    <span style="color:#006e28;">%push</span>   repeat 
    <span style="color:#006e28;">%</span>$begin: 

<span style="color:#006e28;">%endmacro</span>

<span style="color:#006e28;">%macro</span> until <span style="color:#b08000;">1</span>

        j%-<span style="color:#b08000;">1</span>    %$begin
    <span style="color:#006e28;">%pop</span> 

<span style="color:#006e28;">%endmacro</span>

<span style="color:#006e28;">%define</span> %$localmac <span style="color:#b08000;">3</span>

<span style="color:#006e28;">%macro</span> else <span style="color:#b08000;">0</span> 

  <span style="color:#006e28;">%ifctx</span> if 
        <span style="color:#006e28;">%repl</span>   else 
        <span style="font-weight:bold;">jmp</span>     %$ifend 
        <span style="color:#006e28;">%</span>$ifnot: 
  <span style="color:#006e28;">%else</span> 
        <span style="color:#006e28;">%error</span>  &quot;expected <span style="color:#bf0303;">`if' before `</span>else<span style="color:#bf0303;">'&quot; </span>
  <span style="color:#006e28;">%endif</span> 

<span style="color:#006e28;">%endmacro</span> 

<span style="color:#006e28;">%macro</span> endif <span style="color:#b08000;">0</span> 

  <span style="color:#006e28;">%ifctx</span> if 
        <span style="color:#006e28;">%</span>$ifnot: 
        <span style="color:#006e28;">%pop</span> 
  <span style="color:#006e28;">%elifctx</span>      else 
        <span style="color:#006e28;">%</span>$ifend: 
        <span style="color:#006e28;">%pop</span> 
  <span style="color:#006e28;">%else</span> 
        <span style="color:#006e28;">%error</span>  &quot;expected <span style="color:#bf0303;">`if' or `</span>else<span style="color:#bf0303;">' before `endif'&quot; </span>
  <span style="color:#006e28;">%endif</span> 

<span style="color:#006e28;">%endmacro</span>

<span style="color:#644a9b;">some_function:</span> 
    <span style="color:#006e28;">%push</span> mycontext             <span style="color:#898887;">; save the current context </span>
    <span style="color:#006e28;">%stacksize</span> small            <span style="color:#898887;">; tell NASM to use bp </span>
    <span style="color:#006e28;">%assign</span> %$localsize <span style="color:#b08000;">0</span>       <span style="color:#898887;">; see text for explanation </span>
    <span style="color:#006e28;">%local</span> old_ax:<span style="color:#0057ae;">word</span>, old_dx:<span style="color:#0057ae;">word</span> 

        <span style="font-weight:bold;">enter</span>   %$localsize,<span style="color:#b08000;">0</span>   <span style="color:#898887;">; see text for explanation </span>
        <span style="font-weight:bold;">mov</span>     [old_ax],<span style="font-weight:bold;">ax</span>     <span style="color:#898887;">; swap ax &amp; bx </span>
        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">cx</span>,[old_dx] 
        <span style="font-weight:bold;">leave</span>                   <span style="color:#898887;">; restore old bp </span>
        <span style="font-weight:bold;">ret</span>                     <span style="color:#898887;">; </span>

    <span style="color:#006e28;">%pop</span>                        <span style="color:#898887;">; restore original context</span>


<span style="color:#006e28;">%ifdef</span> F1 
    <span style="color:#898887;">; do some setup </span>
<span style="color:#006e28;">%elifdef</span> F2 
    <span style="color:#898887;">; do some different setup </span>
<span style="color:#006e28;">%else</span> 
    <span style="color:#006e28;">%error</span> &quot;Neither F1 nor F2 was defined.<span style="color:#bf0303;">&quot; </span>
<span style="color:#006e28;">%endif</span>
<span style="color:#006e28;">%ifdef</span> F1 
    <span style="color:#898887;">; do some setup </span>
<span style="color:#006e28;">%elifdef</span> F2 
    <span style="color:#898887;">; do some different setup </span>
<span style="color:#006e28;">%else</span> 
    <span style="color:#006e28;">%warning</span> &quot;Neither F1 nor F2 was defined, assuming F1.<span style="color:#bf0303;">&quot; </span>
    <span style="color:#006e28;">%define</span> F1 
<span style="color:#006e28;">%endif</span>%if foo &gt; <span style="color:#b08000;">64</span> 
    <span style="color:#006e28;">%assign</span> foo_over foo-<span style="color:#b08000;">64</span> 
    <span style="color:#006e28;">%error</span> foo is foo_over bytes too large 
<span style="color:#006e28;">%endif</span>

        <span style="color:#0057ae;">db</span>      <span style="font-weight:bold;">__?NASM_VER?__</span>

<span style="font-weight:bold;">struc</span>   mytype 
  <span style="color:#644a9b;">mt_long:</span>      <span style="color:#0057ae;">resd</span>    <span style="color:#b08000;">1</span> 
  <span style="color:#644a9b;">.str:</span>         <span style="color:#0057ae;">resb</span>    <span style="color:#b08000;">32</span> 
<span style="font-weight:bold;">endstruc</span>

<span style="color:#006e28;">%use</span> altreg 


<span style="color:#006e28;">%macro</span>  writefile <span style="color:#b08000;">2</span>+ 

        [<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.data</span>] 

  <span style="color:#644a9b;">%%str:</span>        <span style="color:#0057ae;">db</span>      %<span style="color:#b08000;">2</span> 
  <span style="color:#644a9b;">%%endstr:</span> 

        <span style="font-weight:bold;">__?SECT?__</span> 

        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">dx</span>,<span style="color:#644a9b;">%%str</span> 
        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">cx</span>,<span style="color:#644a9b;">%%endstr</span>-<span style="color:#644a9b;">%%str</span> 
        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">bx</span>,%<span style="color:#b08000;">1</span> 
        <span style="font-weight:bold;">mov</span>     <span style="font-weight:bold;">ah</span>,<span style="color:#b08000;">0x</span><span style="color:#b08000;">40</span> 
        <span style="font-weight:bold;">int</span>     <span style="color:#b08000;">0x</span><span style="color:#b08000;">21</span> 

<span style="color:#006e28;">%endmacro</span>

 <span style="font-weight:bold;">DEFAULT</span> <span style="font-weight:bold;">BND</span> 
     <span style="font-weight:bold;">call</span> foo            <span style="color:#898887;">; BND will be prefixed </span>
     <span style="font-weight:bold;">nobnd</span> call foo      <span style="color:#898887;">; BND will NOT be prefixed</span>

<span style="font-weight:bold;">global</span> _main 
<span style="color:#644a9b;">_main:</span> 
<span style="font-weight:bold;">global</span>  hashlookup:function, hashtable:data

<span style="font-weight:bold;">common</span>  intvar  <span style="color:#b08000;">4</span>
<span style="font-weight:bold;">static</span> foo 
<span style="color:#644a9b;">foo:</span> 
         <span style="color:#898887;">; codes</span>

<span style="color:#006e28;">%pragma</span> macho lprefix L_
<span style="color:#898887;">; The most common conventions </span>
<span style="color:#006e28;">%pragma</span> output gprefix _ 
<span style="color:#006e28;">%pragma</span> output lprefix L_ 
<span style="color:#898887;">; ELF uses a different convention </span>
<span style="color:#006e28;">%pragma</span> elf    gprefix                       <span style="color:#898887;">; empty </span>
<span style="color:#006e28;">%pragma</span> elf    lprefix <span style="color:#644a9b;">.L</span>

<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.pdata</span>  rdata <span style="font-weight:bold;">align</span>=<span style="color:#b08000;">4</span> 
        <span style="color:#0057ae;">dd</span>      main <span style="font-weight:bold;">wrt</span> <span style="color:#644a9b;">..imagebase</span> 
        <span style="color:#0057ae;">dd</span>      main_end <span style="font-weight:bold;">wrt</span> <span style="color:#644a9b;">..imagebase</span> 
        <span style="color:#0057ae;">dd</span>      xmain <span style="font-weight:bold;">wrt</span> <span style="color:#644a9b;">..imagebase</span> 
<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.xdata</span>  rdata <span style="font-weight:bold;">align</span>=<span style="color:#b08000;">8</span> 
<span style="color:#644a9b;">xmain:</span>  <span style="color:#0057ae;">db</span>      <span style="color:#b08000;">9</span>,<span style="color:#b08000;">0</span>,<span style="color:#b08000;">0</span>,<span style="color:#b08000;">0</span> 
        <span style="color:#0057ae;">dd</span>      handler <span style="font-weight:bold;">wrt</span> <span style="color:#644a9b;">..imagebase</span> 
<span style="font-weight:bold;">section</span> <span style="color:#644a9b;">.drectve</span> info 
        <span style="color:#0057ae;">db</span>      <span style="color:#bf0303;">'/defaultlib:user32.lib /defaultlib:msvcrt.lib '</span>
</pre></body></html>
